package com.routz.nettydemo.sprbootintegrate;

import com.routz.nettydemo.sprbootintegrate.server.EchoServer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class EchoConfig {
    @Bean
    public EchoServer echoServer() {
        EchoServer echoServer = new EchoServer();
        try {
            echoServer.run(8080);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return echoServer;
    }
}
